<div class="mt20 clearfix ng-scope ml25">
    <span class="fl lh30 f14">发票信息</span>
    <div class="fr btn-group"
         ng-if="contractBaseInfo.contract_status == 2 && contractBaseInfo.is_cancelled == 0 && !areaRole"
         ng-show="userAuthList.indexOf('0201') !== -1">
        <button>{{remainInvoiceAmount}}</button>
    </div>
</div>
<div id="grid" class="table-wrap mt10 ml25" style="min-height: 200px;">

    <table width="100%" class="valign-t">
        <thead>
        <tr>
            <th width="35">序号</th>
            <th width="150">发票信息</th>
            <th width="70">开票金额</th>
            <th>开票单位</th>
            <th width="160">客户名称</th>
            <th width="70">对应回款</th>
            <th width="70">已回款金额</th>
            <th width="100">附加信息</th>
            <th width="80">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="record in receivableInfo.invoices" ng-if="record.__isdelete != 1">
            <td height="40"><p ng-bind="$index + 1"></p></td>
            <td class="lh14">
                <p>{{record.is_receipt==1?'收据':'发票'}}代码:{{record.invoice_code}}</p>

                <p class="c-gray">{{record.is_receipt==1?'收据':'发票'}}号码:{{record.invoice_no}}</p>
            </td>
            <td>
                <p ng-bind="record.invoice_amount | number:2"></p>
            </td>
            <td>
                <p>{{record.BUName}}</p>

                <p class="c-gray">开票时间:{{record.invoice_date | strdate:'yyyy-MM-dd'}}</p>
            </td>
            <td>
                <p ng-bind="record.customer_name"></p>
            </td>
            <td>
                <p ng-bind="record.receivables_amount|number:2"></p>
            </td>
            <td>
                <p ng-bind="record.payment_amount|number:2"></p>
            </td>
            <td>
                <p>{{ record.is_red_invoice == 1 ? '红冲发票' : record.is_reded_invoice == 1 ? '被红冲发票' : '正常发票'}}</p>
                <p>是否遗失:{{ record.is_lose == 1 ? '是' : '否' }}</p>
                <p>是否收据:{{ record.is_receipt == 1 ? '是' : '否' }}</p>
            </td>

            <td>
            </td>
        </tr>
        </tbody>
    </table>
    <div class="no-data" ng-if="invoices.length == 0" style="height:180px"><span>暂无数据</span></div>

</div>

<div class="ml25 mt10">
    <span class="pl10">说明：收入金额(<em class="b">{{contractBaseInfo| signOrIncomeAmount |number:2}}</em>元) = 已确定发票(<em
            class="b">{{receivableInfo.invoices |sumInvoiceAmount|number:2}}</em>元) + 未确定发票(<em class="b c-red">{{ receivableInfo.invoices | remainInvoiceAmount:contractBaseInfo |number:2}}</em>元)</span>
</div>
